HealthCategoryType PRO
The HealthCategoryType identifies discrete health-related states or events, often recorded as binary values (e.g., present or not present) or discrete outcomes. These are commonly used for tracking symptoms, reproductive health, audio exposure events, and sleep states.
1. Apple Events and System Health
2. Mindfulness and Hygiene
3. Reproductive and Menstrual Health
4. Sleep and Breathing
5. Symptoms and Conditions
Use Cases
- Reproductive Health Apps: Use types like
menstrualFlow,ovulationTestResult,pregnancy, andlactationto help users track fertility and cycles. - Mindfulness and Lifestyle: Use
mindfulSession,handwashingEvent, andtoothbrushingEventfor promoting daily habits. - Sleep and Heart Monitoring: Use
sleepAnalysis,sleepApneaEvent, and heart rhythm-related types to provide nighttime and cardiovascular insights. - Symptom Trackers: Use symptom-related types (e.g.,
fatigue,fever,nausea) in journaling, recovery, or diagnostics support apps.
Example: Save a Sleep Stage Sample
Example: Query Mindful Sessions
Notes
- The
valueprovided to a category sample must match the expected enum for the giventype. - If the
valuedoes not match the required category value type, thecreate()method will returnnull. - Samples must span at least one second (
endDate > startDate).
